CREATE TRIGGER MIGRATIONS_TRG 
BEFORE INSERT ON MIGRATIONS 
FOR EACH ROW 
BEGIN
  <<COLUMN_SEQUENCES>>
  BEGIN
    IF :NEW.MIGRATION_ID IS NULL THEN
      SELECT MIGRATIONS_SEQ.NEXTVAL INTO :NEW.MIGRATION_ID FROM DUAL;
    END IF;
  END COLUMN_SEQUENCES;
END;
/
